<?php
namespace CarApi\Controller;

use Think\Controller;
use Common\Model\ConfigModel;

class SysController extends Controller {

	public function getConfig(){
		$configModel = new ConfigModel;
		$configs = $configModel->getAllConfig();
		$this->ajaxReturn([
				'status'=>1,
				'data'=>['configs'=>$configs]
			]);
	}

	/**
	 * 获取医院对应表
	 */
	public function getHospitalConfig(){
		$configModel = new ConfigModel;
		$configs = $configModel->getHospitalConfig();
		$this->ajaxReturn([
				'status'=>1,
				'data'=>['configs'=>$configs]
			]);
	}

	/**
	 * [getMedicineList description]
	 * @return [type] [description]
	 */
	public function getMedicineList(){
		$configModel = new ConfigModel;
		$list = $configModel->getMedicineList();
		$this->ajaxReturn([
				"status"=>1,
				"data"=>['getMedicine_list'=>$list]
			]);
	}

	/**
	 * [getRatingList description]
	 * @return [type] [description]
	 */			
	public function getRatingList(){
		$lists = C('RATING_LIST');
		$this->ajaxReturn(['status'=>1,'data'=>['rating_list'=>
				[
					'GCS'=>C("GCS_SCORE"),
					'CRMAS'=>C("CRMAS_SCORE"),
					'NIHSS'=>C("NIHSS_SCORE"),
					'ISS'=>C("ISS_SCORE"),
				]
			]]); 
	}
	
}